<template>
  <div>
    <el-dialog
      :visible.sync="centerDialogVisible"
      :before-close="close"
      custom-class="content"
      width="776px"
    >
      <div class="infor">企业信息</div>
      <el-form :model="formData" label-width="120px">
        <el-row>
          <el-col :span="12">
            <el-form-item label="供应商名称">
              {{ formData.supplierName }}
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="联系地址">
              {{ formData.supplierAddress }}
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="银行账号">
              {{ formData.supplierBankNumber }}
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="统一信用代码">
              {{ formData.supplierCode }}
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="开户行信息">
              {{ formData.supplierBank }}
            </el-form-item>
          </el-col>
          <!-- <el-col :span="12">
            <el-form-item label="开户行">
              <div v-for="(item, index) in erp_bank" :key="index">
                {{ item.value == formData.supplierBank ? item.label : "" }}
              </div>
            </el-form-item>
          </el-col> -->
          <!-- <el-col :span="12">
            <el-form-item label="手续费">
              {{ formData.supplierFee }}
            </el-form-item>
          </el-col> -->
          <!-- <el-col :span="12">
            <el-form-item label="结算方式">
              <div v-for="(item, index) in erp_settlement_method" :key="index">
                {{ item.value == formData.supplierSettlementMethod ? item.label : "" }}
              </div>
            </el-form-item>
          </el-col> -->
          <el-col :span="12">
            <el-form-item label="联系人1">
              {{ formData.supplierContacts1 }}
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="联系人2">
              {{ formData.supplierContacts2 }}
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="联系人3">
              {{ formData.supplierContacts3 }}
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <div style="height: 30px"></div>
          </el-col>
        </el-row>
      </el-form>
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: {
    // 数据
    formData: {
      type: Object,
      default: () => ({})
    },
    // 当前的值
    centerDialogVisible: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      erp_bank: []
    }
  },
  created() {
    // this.getDict()
  },
  methods: {
    close() {
      this.$emit("dialogClose", false, "close")
    },
    getDict() {
      this.$store.dispatch('GetDict', 'erp_bank').then(response => {
        this.erp_bank = response.data
      })
    }
  }
}
</script>

<style scoped>
::v-deep .el-dialog {
  top: 15%;
  border-radius: 12px;
  font-weight: bold;
}
.infor {
  font-size: 22px;
  text-align: center;
  font-weight: bold;
  color: #262626;
  line-height: 1.5em;
  margin-bottom: 40px;
}
</style>